package com.zzw.requestcontext;

import com.zzw.interceptor.RequestContextInterceptor;

import java.time.LocalDateTime;

/**
 * @author Administrator
 */
public class RequestContext {
    private String sn;
    private LocalDateTime requestTime;
    private String ip;

    public static RequestContext getInstance() {
        return RequestContextInterceptor.getRequestContext();
    }

    public RequestContext() {
    }

    public RequestContext(String sn, LocalDateTime requestTime, String ip) {
        this.sn = sn;
        this.requestTime = requestTime;
        this.ip = ip;
    }

    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    public LocalDateTime getRequestTime() {
        return requestTime;
    }

    public void setRequestTime(LocalDateTime requestTime) {
        this.requestTime = requestTime;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }
}
